var Dog = require("./dog.js");
var dog = new Dog("taidy",9);

//dog对象具备EventEmitter的属性方法
dog.on("bark",()=>{
    dog.bark();    
})


setTimeout(() => {
    dog.emit("bark");
}, 1000);